﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 相对路径，相对于当前访问的文件的位置开始查找 -->
    <link rel="stylesheet" href="/static/css/bootstrap.css">
    <link rel="stylesheet" href="/static/js/jquery-2.1.0.min.js">
    <style>
       .cus-container{
           width: 1368px;
       }
       .success th,table td{text-align:center;}
    </style>
</head>
<body>
<a href="/Route_Img/addtianjia">添加</a>
    <div class="container cus-container">
    	
        <h3 class="text-center" style="font-weight:bold">线路详情列表</h3>


      
       <table class="table table-bordered clearfix">
        <tr class="success">
            <th>线路ID</th>
            <th>详情ID</th>
            <th>图片</th>
            <th>操作</th>
        </tr>        
        <tr th:each="Route_Img:${route_imgPager.getList()}">
            <td th:text="${Route_Img.getRouteId()}"></td>
            <td th:text="${Route_Img.getImgId()}"></td>
            <td ><img  width="200" height="100" src="" th:src="'/uploads/'+${Route_Img.getImgSrc()}" ></td>


            <td>

                <a href="" th:href="'/Route_Img/deleteRoute_Img?Img_Id='+${Route_Img.getImgId()}+'&RouteId='+${Route_Img.getRouteId()}">删除</a>
                <a href="" th:href="'/Route_Img/edit?Img_Id='+${Route_Img.getImgId()}+'&RouteId='+${Route_Img.getRouteId()}">修改</a>

            </td>
        </tr>

      </table>

    </div>
    <!-- 分页导航 -->
    <div>
        <nav style="float: left;">
            <ul class="pagination">
                <li>
                    <a href="" th:href="'/Route_Img/toRoute_Imglist?currentPage='+${route_imgPager.getCurrentPage()-1 < 0 ? 1 : route_imgPager.getCurrentPage()-1}" aria-label="Previous">
                        <span aria-hidden="true">上一页</span>
                    </a>
                </li>

                <!-- 中间的页数 -->

                <ul th:with="size=${route_imgPager.totalPage}">
                    <li  th:each="index: ${#numbers.sequence(1,size)}">
                        <a th:href="@{'/Route_Img/toRoute_Imglist?currentPage=' + ${index}}" th:text="${index}"></a>
                    </li>
                </ul>


                <li>
                    <a href="" th:href="'/Route_Img/toRoute_Imglist?currentPage='+${route_imgPager.getCurrentPage()+1 > route_imgPager.getTotalPage() ? route_imgPager.getTotalPage(): route_imgPager.getCurrentPage()+1 }" aria-label="Next">
                        <span aria-hidden="true">下一页</span>
                    </a>
                </li>
            </ul>
        </nav>

    <div style="float: right;margin-top: 25px;">
        <span th:text="'共'+${route_imgPager.getTotal()}+'条记录,分'+${route_imgPager.getTotalPage()}+ '页显示'">共xxx条记录，分...页显示</span>
    </div>

</body>
</html>